waitqueue: Reorder prepare_to_wait() so that vcpu is definitely on the
authorKeir Fraser <keir@xen.org>
Thu, 24 Nov 2011 15:49:25 +0000 (15:49 +0000)
committerKeir Fraser <keir@xen.org>
Thu, 24 Nov 2011 15:49:25 +0000 (15:49 +0000)
commit9333781f509b67bf5c08a790664a660bab3dc819
tree5631889cbfa93aadb3c9dc7448ebd578801622b6
parent7d798b7c997fe7631431275371d134ae3e926be7
waitqueue: Reorder prepare_to_wait() so that vcpu is definitely on the
queue on exit, even after a wakeup.

Otherwise, when we go round the loop in wait_event(), we may not
actually sleep after the first iteration, as we do not put ourselves
back on the queue on wakeup.

Signed-off-by: Keir Fraser <keir@xen.org>
xen/common/wait.c